package com.transfiguro;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.swing.*;
import java.awt.*;

public class UiCore {
    private final Logger logger = LoggerFactory.getLogger(UiCore.class);

    public UiCore() {
        final JFrame frame = new JFrame(getClass().getName());
        final Container container = frame.getContentPane();
        final JavaFileView javaFileView = new JavaFileView();
        final GridLayout gridLayout = new GridLayout(0 ,2);
        container.setLayout(gridLayout);
        container.add(javaFileView.getScrollPane());
        container.add(javaFileView.getCsScrollPane());
        container.doLayout();
        frame.setSize(1000, 1000);
        frame.setVisible(true);
        JOptionPane.showMessageDialog(null, "Drag and drop working java file on to the left " +
                "\n See converted C# file on the right");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(final String[] args) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new UiCore();
            }
        });
    }
}
